import 'package:flutter/services.dart';

import 'my_flutter_plugin_platform_interface.dart';

class MyFlutterPlugin {
  static const EventChannel _eventChannel =
      EventChannel("bmy_flutter_plugin_eventChannel");

  Future<String?> getPlatformVersion() {
    return MyFlutterPluginPlatform.instance.getPlatformVersion();
  }

  static initEvent() {
    _eventChannel.receiveBroadcastStream().listen((map) {
      print("MyFlutterPlugin listen = $map");
    });
  }

  ///测试警报声
  Future<void> testWarnSound() async {
    return MyFlutterPluginPlatform.instance.testWarnSound();
  }
}
